package com.md.domain.model.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.md.base.BasePO;
import com.md.util.StringUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;


/**
 * 接口权限表
 *
 * @author 刘骄阳
 * @since 2022-04-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@TableName("`api`")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Apis extends BasePO {

  private static final long serialVersionUID = 1L;

  /**
   * 接口路径
   */
  private String url;

  /**
   * 接口名
   */
  private String name;

  /**
   * 权限(0:无需权限;1:需要权限;2:禁止访问)
   */
  private Integer auth;
  /**
   * 所属模块
   */
  private Integer module;

  @Override
  public String toString() {
    return StringUtil.objectToJson(this);
  }
}
